<template>
   <div class="">
    <h1>provideA.vue {父亲级别}</h1>
    <div class="box">
        
    </div>
    <hr>
    <provideBVue></provideBVue>
   </div>
</template>

<script setup lang='ts'>
import {ref,Ref ,reactive,inject} from 'vue'
import provideBVue from './provideBVue.vue'
const color = inject<Ref<string>>('color')
</script>

<style  scoped>
.box{
    height: 50px;
    width:50px;
    border:1px solid #ccc;
    background: v-bind(color);
}
</style>